/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package programas;

/**
 *
 * @author Administrador
 */
import java.util.*;
public class main7 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
           double x, a, b, c, x1;

        Scanner sc= new Scanner(System.in);

        System.out.println("Introduce las variables para la formula general");

        System.out.println("valor para a");
        a=sc.nextInt();
        System.out.println("valor para b");
        b=sc.nextInt();

        System.out.println("valor para c");
        c=sc.nextInt();

       x=(-b+(Math.sqrt(Math.pow(b, 2)-4*a*c)))/2*a;
        System.out.println(x);

        x1=(-b-(Math.sqrt(Math.pow(b, 2)-4*a*c)))/2*a;
        System.out.println(x1);
    }
//este metodo es el k realiza la formula general
    }


